package edu.cuit.avatar.dao.bean;

import edu.cuit.avatar.dao.PaymentDao;
import edu.cuit.avatar.po.Payment;
import jakarta.annotation.Resource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/8/14 10:58
 */
@Service
public class PaymentDaoBean implements PaymentDao {
    @Resource
    private  JdbcTemplate template;
    @Override
    public void insert(Payment payment) {
        var sql = "insert into payment(order_id,pay_type) values(?,?)";
        template.update(sql, payment.getOrderId(), payment.getPayType());
    }
}
